import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:"/music"
  },
  {
    path:'/music',
    name:'Music',
    component:()=>import("../views/Music/Music.vue"),
    meta:{
      isNav:true
    },
  },
  {
    path:"/music/hotmusic",
    name:"HotMusic",
    component:()=>import("../views/Music/More/HotMusic.vue")
  },
  {
    path:"/music/newmusic",
    name:"NewMusic",
    component:()=>import("../views/Music/More/NewMusic.vue")
  },
  {
    path:"/music/djmusic",
    name:"DjMusic",
    component:()=>import("../views/Music/More/DjMusic.vue")
  },
  {
    path:"/music/search/:key",
    name:"MusicSearch",
    component:()=>import("../views/Music/Search/Search.vue")
  },
  {
    path:"/music/detail/:id",
    name:"MusicDetail",
    component:()=>import("../views/Music/Detail/MusicDetail.vue")
  },
  {
    path:"/music/song/:id",
    name:"SongDetail",
    component:()=>import("../views/Music/Detail/SongDetail.vue")
  },
  {
    path:"/article",
    name:"Article",
    component:()=>import("../views/article/Article.vue"),
    meta:{
      isNav:true
    },
  },
  {
    path:"/article/detail/:id",
    name:"ArticleDetail",
    component:()=>import("../views/article/Detail/ArticleDetail.vue")
  },
  {
    path:"/movie",
    name:'Movie',
    component:()=>import("../views/Movie/Movie.vue"),
    meta:{
      isNav:true
    },
  },
  {
    path:"/movie/hotmovie",
    name:"HotMovies",
    component:()=>import("../views/Movie/More/HotMovies.vue")
  },
  {
    path:"/movie/soonmovie",
    name:"SoonMovies",
    component:()=>import("../views/Movie/More/SoonMovies.vue")
  },
  {
    path:"/movie/top250",
    name:"Top250",
    component:()=>import("../views/Movie/More/Top250.vue")
  },
  {
    path:"/movie/search",
    name:"Search",
    component:()=>import("../views/Movie/Search/Search.vue")
  },
  {
    path:"/movie/detail/:id",
    name:"MovieDetail",
    component:()=>import("../views/Movie/Detail/Detail.vue")
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
